<!-- 
/**
 * 系统配置 列表页 JS 脚本
 * @author 李方捷 , leefangjie@qq.com
 * @since 2021-06-15 16:58:08
 */
 -->
 <!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
	<title th:text="${lang.translate('系统配置')}">系统配置</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css"/>
    <link rel="stylesheet" href="/assets/css/foxnic-web.css">
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>
</head>

<body>

<form id="data-form" lay-filter="data-form" class="layui-form model-form" style="display:none">
  
    
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('配置键')}" >配置键</label>
        <div class="layui-input-block">
            <input readonly lay-filter="code" id="code" name="code" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('配置键') }" type="text" class="layui-input"    />
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('配置名')}">配置名</label>
        <div class="layui-input-block">
            <input readonly lay-filter="name" id="name" name="name" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('配置名') }" type="text" class="layui-input"    />
        </div>
    </div>
    
	
	
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('数据类型')}">数据类型</label>
        <div class="layui-input-block">
            <input disabled type="radio" name="type" lay-filter="type" th:each="e,stat:${enum.toArray('org.github.foxnic.web.constants.enums.SystemConfigType')}" th:value="${e.code}" th:title="${e.text}">
        </div>
    </div>
    
	
    
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('类型描述')}">类型描述</label>
        <div class="layui-input-block">
            <input readonly lay-filter="typeDesc" id="typeDesc" name="typeDesc" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('类型描述') }" type="text" class="layui-input"    />
        </div>
    </div>
    
	
        
     <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('配置值')}">配置值</label>
        <div class="layui-input-block"  th:if="${config}!=null">
        	<input th:if="${config.type}=='DATETIME'" type="text" name="value" id="value" lay-verify="value" th:placeholder="${ lang.translate('请选择') +''+ lang.translate('日期') }" autocomplete="off" class="layui-input" tag="date">
            <input th:if="${config.type}=='STRING'"  lay-filter="value" id="value" name="value" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('配置值') }" type="text" class="layui-input"    />
            <input th:if="${config.type}=='NUMBER'"  lay-filter="value" id="value" name="value" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('配置值') }" type="text"  class="layui-input" lay-verify="number" />
            <input th:if="${config.type}=='ENUM'"  type="radio" name="value" lay-filter="value" id="value" th:each="e,stat:${enum.toArray(config.typeDesc)}" th:value="${e.code}" th:title="${e.text}">
        </div>
        <div class="layui-input-block"  th:if="${config}==null">
        	<input  lay-filter="value" id="value" name="value" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('配置值') }" type="text" class="layui-input"    />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('是否生效')}">是否生效</label>
        <div class="layui-input-block">
            <input type="checkbox" checked="" id="valid"  name="valid" lay-skin="switch" lay-filter="valid" lay-text="有效|无效" value="1">
        </div>
    </div>
    
	
    
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('说明')}">说明</label>
        <div class="layui-input-block">
            <input lay-filter="notes" id="notes" name="notes" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('说明') }" type="text" class="layui-input"    />
        </div>
    </div>

    
	
<div class="layui-form-item model-form-footer"  >
        <button class="layui-btn layui-btn-primary" id="cancel-button" lay-filter="cancel-button"  type="button" th:text="${lang.translate('取消')}">取消</button>
        <button class="layui-btn"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存')}">保存</button>
</div>
    
</form>



<script type="text/javascript" src="/module/global.js"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js"></script>

<script src="/business/system/config/config_form.js"></script>

</body>
</html>